8be0f7da1dfc1cce29b3642f8853c19447471d0f,java/test/net/razorvine/pyro/test/MessageTests.java,MessageTests,testRecvAnnotations,#,179
Before Change
Map<String, byte[]> annotations = new HashMap<String, byte[]>();
annotations.put("TEST", new byte[]{10, 20,30,40,50});
Message msg = new Message(Message.MSG_CONNECT, new byte[]{1,2,3,4,5}, this.ser.getSerializerId(), 0, 0, annotations);
ConnectionMock c = new ConnectionMock();
c.send(msg.to_bytes());
msg = Message.recv(c, null);
assertEquals(0, c.RemainingLength());
assertEquals(5, msg.data_size);
After Change
Map<String, byte[]> annotations = new HashMap<String, byte[]>();
annotations.put("TEST", new byte[]{10, 20,30,40,50});
Message msg = new Message(Message.MSG_CONNECT, new byte[]{1,2,3,4,5}, this.ser.getSerializerId(), 0, 0, annotations, "secret".getBytes());
byte[] data = msg.to_bytes();
InputStream is = new ByteArrayInputStream(data);
msg = Message.recv(is, null, "secret".getBytes());
assertEquals(0, is.available());
assertEquals(5, msg.data_size);